package castledefense.logic.units;

public class Destination {
	
	private double posX;
	private double posY;
	private double size;
	
	public Destination(double posX, double posY, double size){
		this.posX = posX;
		this.posY = posY;
		this.size = size;
	}
	
	public double getCenterX() { return posX; }

	public double getCenterY() { return posY; }
	
	public double getMinX() { return posX - size/2; }
	
	public double getMinY() { return posY - size/2; }
	
	public double getMaxX() { return posX + size/2; }
	
	public double getMaxY() { return posY + size/2; }

	public double getSize() { return size; }
	
	public boolean contains(int x, int y) {
		if ((getMinX() <= x && getMaxX() >= x) && (getMinY() <= y && getMaxY() >= y)) {
			return true;
		}
		return false;
	}
	
	

}
